table.img_metadata {
    display: block;
    flex-shrink: 0;
    font-size: 0.95em;
    width: 100%;
    background-color: var(--SmartThemeBlurTintColor);
    backdrop-filter: blur(var(--SmartThemeBlurStrength));
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: 0.5em;
    text-align: left;
    max-height: 20dvh;
    overflow-y: auto;
}

table.img_metadata ~ pre {
    display: none;
}

table.img_metadata th,
table.img_metadata td {
    position: relative;
    padding: 0.5em;
    border: 1px solid var(--SmartThemeBorderColor);
}

table.img_metadata td {
    padding-right: calc(0.5em + 22px);
    white-space: pre-wrap;
}

table.img_metadata th {
    font-weight: bold;
    text-align: center;
}

div.img_metadata_button {
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    height: 22px;
    width: 22px;
    margin: 4px;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img_enlarged_container:has(.img_enlarged.zoomed) .img_metadata {
    display: none;
}
